import { onMounted, reactive } from 'vue'
import { getBannerAPI } from '@/apis/home'

export function useBanner() {
    const bannerList = reactive([])

    const getBanner = async () => {
        const { result } = await getBannerAPI('2')
        Object.assign(bannerList,result)
    }

    onMounted(() => {
        getBanner()
    })

    return { bannerList }

}
